package shoppingmall.manage.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import shoppingmall.manage.dto.PageBean;
import shoppingmall.manage.mapper.UserAddressMapper;

import shoppingmall.manage.pojo.UserAddress;

import shoppingmall.manage.service.UserAddressService;


import java.util.List;

/**
 * 服务层接口实现类-提供获取平台会员用户收货地址表的相关信息
 */
@Service
public class UserAddressServiceImpl implements UserAddressService {

    @Autowired
    private UserAddressMapper userAddressMapper;

    /**
     * 查询平台会员用户收货地址表中的所有数据(数据大屏使用)
     */
    @Override
    public PageBean getAllMemberAddressList() {
        //调用mapper层方法
        List<UserAddress> userAddressList = userAddressMapper.getUserAddressList();
        return new PageBean(userAddressList.size(),userAddressList);
    }
}
